package com.teama4.shop.config;

import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {

//↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "2016101000649780";

    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCZEGe6bqqnV4dNJDcAtOWNJyGMxgroPbJhMdc30ibRa3Xnpc8NKOZuQm9RHEZdrYNYtCs5vQK3iesQWJ7aG2BPPLizMPsu/JRXE/O1l6G31xCpkHHbY2nBiuDw1/H2C0ti8BR0VRQx7RLH1ODDiQP+7kFb1xH41C7UPgR0PEfhs5sU+PB3CuYd72xsmi9fuRf25k3/yiEeZ1+ZQxKCLKo4i458Rxg2qRnMh8SVZANhoWoJ80umOroIxOp1vvT1Qe+6fU+gjIpypHZlnp9jZD1QRZYkv1KrFmf1oZ5Vm9fJDVQ4IBoE30AhwqKYwGs0RZaGMkJuaRLJYz+a2EsWqdoPAgMBAAECggEAZGU4RDZWRNDKdDSuxw3gCweBn/4+JTpiiBHS4lA7Gd1sRnahKjaLfgKhVQhAty0aG9KBD6wD3jLeNaiK+PA/6XkghJg6CQWunrb9gTxl3Fl6Gl4d8BJyyXm4NQDPOd0Ko2hpYixzxJOFYAEnM9no/wtzXzPgG9/An4HWFg977nOFp3aAsIGb9oukoC6usMGm6U5RXcbOY1rSXjNABq1qH1MsyN7p+niInyK/XaIkqjv4eENk84nIBGErGM20jw+SIKumyJAyMwYKpuwt+v4EeEvIAzIhqKgDNEJzwhDwlcY3yG6V6etTtABynjhtFnrML+g6Z40f18I9pW4YhlEvsQKBgQDTUtOUeMJ3u3DrQifETrrECs94S7d2954Rs08UtLyQobnsbiWN+mizY1wt3rAVWO2Kbvp8Yooa/R74BqFfHjqKA+BL8hQ3deFD9y5DhMynW6l7zg4KRqLnHLL0EeB4beXsJhDHCwloxZ4DG2a0jCBHIppxk7cGVQPjpXrtYtrOjQKBgQC5bHttIINQzyW2zSpOAdpMqa3J+HziehuDwMgWLzepXFQv7+EV1ZCmHK65aGFHU9ITP9rMiAGYCnxejI3uqqLpB3EUF+k18QFKS4Xyp2i+WvJDoLSpDmKjbEiUfQr0+dlw0jcp87GfYgav9ViZFrP2Yw34O53vULwWuP141TViCwKBgFxMQL0IQWeqJpeaPWQwPsKBNjyEVY1QeWmht1iD2BgTivEI6r4oMLKpIwmlyaKJRLbB4gWRxGAlTfFmc/Tnbwn4x25kPRA8HDdjLoGu7vPpxQyd4uP6Fgx7LG4NoMz4swOBXLKSz3lDVtBkl2ckDLUFGA+jRL0vRJOZIyerlYXBAoGBAJiGUN0KUpplWxuMlpEGWyCWrrslqOzPDtUI/k2pV3r71NB93MQOIedSTrN61hJLM9Hbw8pc0hrT/Uv1CEdbm5heI7kolhBmB+6qQyvAY5u5yfCxQAqUJ7VQPD/Qv/OVljSE5xWePOzjQKb7BX8gOrag8nvP5nFWEvIKB46eq0PTAoGBAMrPDMQgHc5z3+5lr8KyFiqJ2qe8zmbuVUm9gZEXQt0o635hrs2Z2bcr9s4GxIyUSCD+6+CCrOln/cGlbrl9JDgMxsrluKujU9exnalsNpyTStsLl6DxxTV6ML/uPSuEsvNuvhIkyE3QmbT147zl29qpNgfq9viON7wi04Vy9Tca";

    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyI+fklfFjW21GzrtKnGZjZur39Qd6o+2X2qDU8ImDyrqw/Oz/3DGjhYkUW0lIG7ai/8vxmPqw9SCL9pLm6zvEJheTrCV0C2xEOx6KUtMVN6X89YR1VcvdcIUMKzl4N0GrOQI6L4g/I/zFgMh2DL0tDvxgopCiP3b0SqQqVhmPJIqax1WXOU2I3RFuReINt/Ppl9Ops/EXPVuMvl/12RSdfqDpGWeLbNf/IEbj4TQgiZqJtJe7N34ZHWIsaUE81LE17hPZHvSNvtyACXUvyRSbx6B5JtJwg4m6jYT/2PeOKCJaooUVKDjDUnZ/eVL4yvUi8HJrw1UTIvBgehniXTfUQIDAQAB";

    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://localhost:8180/orders/notify_url";

    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问  return_url.jsp
    public static String return_url = "http://localhost:8180/orders/return_url";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    // 支付宝网关
    public static String log_path = "C:\\";

    /**
     *      * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     *      *
     *      * @param sWord
     *      * 要写入日志里的文本内容
     *      
     */
    public static void

    logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_"
                    + System.currentTimeMillis() + ".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }


}
